﻿<?xml version="1.0" encoding="utf-8"?>
<DataDictionary.System.History>
  <Version number="1.0.0.0">
    <Entities>
      <Entity name="tblUsuario">
        <Description>Tabela onde ficarão as informações sobre os usuários e os grupos de usuários.</Description>
        <FriendlyName>Usuários</FriendlyName>
        <Columns>
          <Column name="UsuarioGrupoID">
            <Description>Código do usuário.</Description>
            <FriendlyName>Código</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>True</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
    </Entities>
    <References>
    </References>
    <CreatedDate>01/01/1980 00:00</CreatedDate>
    <Description>
    </Description>
  </Version>
  <Version number="1.0.0.1">
    <CreatedDate>02/05/2006 23:38</CreatedDate>
    <Description>
    </Description>
    <Entities>
      <Entity name="tblUsuario">
        <Description>Tabela onde ficarão as informações sobre os usuários e os grupos de usuários.</Description>
        <FriendlyName>Usuários</FriendlyName>
        <Columns>
          <Column name="UsuarioGrupoID">
            <Description>Código do usuário.</Description>
            <FriendlyName>Código</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>True</AutoGenerated>
          </Column>
          <Column name="Nome">
            <Description>Nome do usuário.</Description>
            <FriendlyName>Nome</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>True</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>50</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Descricao">
            <Description>Descrição do usuário.</Description>
            <FriendlyName>Descrição</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>255</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Email">
            <Description>E-mail do usuário.</Description>
            <FriendlyName>E-mail</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>255</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Usuario">
            <Description>Se é usuario ou nao (grupo).</Description>
            <FriendlyName>Usuário</FriendlyName>
            <DataType>Bit</DataType>
            <Required>True</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Senha">
            <Description>Senha do usuário.</Description>
            <FriendlyName>Senha</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>20</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Inativo">
            <Description>Define se o usuário está ativo/inativo.</Description>
            <FriendlyName>Inativo</FriendlyName>
            <DataType>Bit</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="AlterarSenha">
            <Description>Define se usário deve alterar senha no próximo login.</Description>
            <FriendlyName>Alterar senha</FriendlyName>
            <DataType>Bit</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
      <Entity name="tblRecurso">
        <Description>Recursos do sistema a quem o usuário poderá ter direito ou nao.</Description>
        <FriendlyName>Recursos</FriendlyName>
        <Columns>
          <Column name="RecursoID">
            <Description>Código do recurso.</Description>
            <FriendlyName>Código</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Nome">
            <Description>Nome do recurso.</Description>
            <FriendlyName>Nome</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>True</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Descricao">
            <Description>
            </Description>
            <FriendlyName>Descrição</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>255</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="RecursoPaiID">
            <Description>Código do recurso pai.</Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Nivel">
            <Description>Nível que o recurso se encontra.</Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="ModuloID">
            <Description>Código do módulo que este recurso faz parte.</Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
      <Entity name="tblLog">
        <Description>Ações dos usuários.</Description>
        <FriendlyName>Log</FriendlyName>
        <Columns>
          <Column name="LogID">
            <Description>Código do log.</Description>
            <FriendlyName>Código</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>True</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>True</AutoGenerated>
          </Column>
          <Column name="AcaoID">
            <Description>Código da ação.</Description>
            <FriendlyName>Código da ação</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="UsuarioGrupoID">
            <Description>Código do usuário.</Description>
            <FriendlyName>Usuário</FriendlyName>
            <DataType>Integer</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Data">
            <Description>Data e hora do evento.</Description>
            <FriendlyName>Data/hora</FriendlyName>
            <DataType>Date</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Host">
            <Description>Endereço do cliente.</Description>
            <FriendlyName>Endereço do usuário</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>50</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Objeto">
            <Description>Objeto que foi alterado.</Description>
            <FriendlyName>Objeto</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>100</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Descricao">
            <Description>Descrição da ação.</Description>
            <FriendlyName>Descrição</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>255</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
      <Entity name="tblPermissao">
        <Description>Permissões dos usuários.</Description>
        <FriendlyName>Permissões</FriendlyName>
        <Columns>
          <Column name="PermissaoID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>True</AutoGenerated>
          </Column>
          <Column name="RecursoID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="UsuarioGrupoID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
      <Entity name="tblGrupoUsuario">
        <Description>Relacionamento entre usuários e grupos. | Um grupo tem vários usuários. Um grupo tem vários grupos.</Description>
        <FriendlyName>Grupos do usuário</FriendlyName>
        <Columns>
          <Column name="GrupoUsuarioID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>True</AutoGenerated>
          </Column>
          <Column name="GrupoID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="UsuarioID">
            <Description>
            </Description>
            <FriendlyName>
            </FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>True</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
      <Entity name="tblModulos">
        <Description>Definição dos módulos do sistema.</Description>
        <FriendlyName>Módulos</FriendlyName>
        <Columns>
          <Column name="ModuloID">
            <Description>Código do Módulo.</Description>
            <FriendlyName>Código</FriendlyName>
            <DataType>Integer</DataType>
            <Required>True</Required>
            <PrimaryKey>True</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Titulo">
            <Description>Título do módulo.</Description>
            <FriendlyName>Título</FriendlyName>
            <DataType>Varchar</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>100</Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
          <Column name="Instalado">
            <Description>Define se o módulo está instalado para exibir opções nos menus do sistema.</Description>
            <FriendlyName>Instalado</FriendlyName>
            <DataType>Bit</DataType>
            <Required>False</Required>
            <PrimaryKey>False</PrimaryKey>
            <Size>
            </Size>
            <DefaultValue>
            </DefaultValue>
            <ShowDataEntry>False</ShowDataEntry>
            <ShowLists>False</ShowLists>
            <AutoGenerated>False</AutoGenerated>
          </Column>
        </Columns>
      </Entity>
    </Entities>
    <References>
      <Reference name="tblPermissao_to_tblUsuario">
        <Description>Relacionamento dos usuários para as permissões.</Description>
        <ParentName>tblUsuario</ParentName>
        <ParentField>UsuarioGrupoID</ParentField>
        <ChildName>tblPermissao</ChildName>
        <ChildField>UsuarioGrupoID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblPermissao_to_tblRecurso">
        <Description>Relacionamento das permissões com os recursos.</Description>
        <ParentName>tblRecurso</ParentName>
        <ParentField>RecursoID</ParentField>
        <ChildName>tblPermissao</ChildName>
        <ChildField>RecursoID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblRecurso_to_tblRecurso">
        <Description>Relacionamento do recurso filho com o pai.</Description>
        <ParentName>tblRecurso</ParentName>
        <ParentField>RecursoID</ParentField>
        <ChildName>tblRecurso</ChildName>
        <ChildField>RecursoPaiID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblLog_to_tblUsuario">
        <Description>Relacionamento do log com os usuários.</Description>
        <ParentName>tblUsuario</ParentName>
        <ParentField>UsuarioGrupoID</ParentField>
        <ChildName>tblLog</ChildName>
        <ChildField>UsuarioGrupoID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblGrupoUsuario_to_tblUsuario">
        <Description>
        </Description>
        <ParentName>tblUsuario</ParentName>
        <ParentField>UsuarioGrupoID</ParentField>
        <ChildName>tblGrupoUsuario</ChildName>
        <ChildField>GrupoID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblGrupoUsuario_to_tblUsuario2">
        <Description>
        </Description>
        <ParentName>tblUsuario</ParentName>
        <ParentField>UsuarioGrupoID</ParentField>
        <ChildName>tblGrupoUsuario</ChildName>
        <ChildField>UsuarioID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
      <Reference name="tblRecurso_to_tblModulos">
        <Description>Relacionamento dos recursos com os módulos.</Description>
        <ParentName>tblModulos</ParentName>
        <ParentField>ModuloID</ParentField>
        <ChildName>tblRecurso</ChildName>
        <ChildField>ModuloID</ChildField>
        <Cardinality>1:N</Cardinality>
      </Reference>
    </References>
  </Version>
</DataDictionary.System.History>